Using Multiple Cameras in Shockwave 3D Worlds
Table of Contents
Switching Between Multiple Camera Views
Another useful approach in instructional media lets the user select and view a time-based process from different perspectives. A typical example is to have a single View Port into a 3D world, which you can switch to use different cameras by clicking a series buttons; this is exactly what happens in the sample2.dir movie (see Figure 6).
Figure 6. The sample2.dir movie in action
As before, this movie accomplishes this through a single behavior,
only this time, in the movie, I attached the behavior to each of the
four buttons that a user clicks, which changes the camera
property of the single Shockwave 3D sprite through two behavior parameters
(see Figure 7).
Figure 7. Inspecting the camera-button behavior
This behavior is a slightly-modified version of the previous one. Its modifications consist of no new 3D Lingo, but rather just a single new behavior property, which it uses to facilitate specification of the sprite channel number of button's target Shockwave 3D sprite:
property pSprite, pCamera on mouseUp me -- set this sprite's camera to -- the one selected sprite(pSprite).camera = sprite(pSprite).member.camera(pCamera) end on getPropertyDescriptionList me propList = [:] -- let the author specify -- which sprite to use by -- channel number addProp propList, #pSprite, [#comment:"Sprite to effect: ", #format: #integer, #default: 1] -- let the author specify which -- camera to use by name addProp propList, #pCamera, [#comment:"Camera to use: ", #format: #string, #default: ""] return propList end
Conclusion
By now you should have an idea of some of the powerful possibilities of using multiple cameras in real-time 3D. The ability to create a complex animated or interactive scene once, and then view it from various or changing perspectives in real-time, opens the door to expressions of visual information in entirely new spatial and temporal combinations.